/*
 * Amazon Ads API - Sponsored Products
 * Use the Amazon Ads API for Sponsored Products for campaign, ad group, keyword, negative keyword, and product ad management operations. For more information about Sponsored Products, see the [Sponsored Products Support Center](https://advertising.amazon.com/help?entityId=ENTITY3CWETCZD9HEG2#GWGFKPEWVWG2CLUJ). For onboarding information, see the [account setup](setting-up/account-setup) topic.<br/><br/> 
 *
 * The version of the OpenAPI document: 2.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package org.openapitools.client.model;

import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import org.openapitools.client.model.ExpressionType;
import org.openapitools.client.model.State;
import org.openapitools.client.model.TargetingExpressionPredicate;

/**
 * CreateNegativeTargetingClause
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-04-12T19:05:39.971406+08:00[Asia/Shanghai]")
public class CreateNegativeTargetingClause {
  public static final String SERIALIZED_NAME_CAMPAIGN_ID = "campaignId";
  @SerializedName(SERIALIZED_NAME_CAMPAIGN_ID)
  private BigDecimal campaignId;

  public static final String SERIALIZED_NAME_AD_GROUP_ID = "adGroupId";
  @SerializedName(SERIALIZED_NAME_AD_GROUP_ID)
  private BigDecimal adGroupId;

  public static final String SERIALIZED_NAME_STATE = "state";
  @SerializedName(SERIALIZED_NAME_STATE)
  private State state;

  public static final String SERIALIZED_NAME_EXPRESSION = "expression";
  @SerializedName(SERIALIZED_NAME_EXPRESSION)
  private List<TargetingExpressionPredicate> expression = null;

  public static final String SERIALIZED_NAME_EXPRESSION_TYPE = "expressionType";
  @SerializedName(SERIALIZED_NAME_EXPRESSION_TYPE)
  private ExpressionType expressionType;


  public CreateNegativeTargetingClause campaignId(BigDecimal campaignId) {
    
    this.campaignId = campaignId;
    return this;
  }

   /**
   * The identifier of the campaign to which this negative target is associated.
   * @return campaignId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The identifier of the campaign to which this negative target is associated.")

  public BigDecimal getCampaignId() {
    return campaignId;
  }


  public void setCampaignId(BigDecimal campaignId) {
    this.campaignId = campaignId;
  }


  public CreateNegativeTargetingClause adGroupId(BigDecimal adGroupId) {
    
    this.adGroupId = adGroupId;
    return this;
  }

   /**
   * The identifier of the ad group to which this negative target is associated.
   * @return adGroupId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The identifier of the ad group to which this negative target is associated.")

  public BigDecimal getAdGroupId() {
    return adGroupId;
  }


  public void setAdGroupId(BigDecimal adGroupId) {
    this.adGroupId = adGroupId;
  }


  public CreateNegativeTargetingClause state(State state) {
    
    this.state = state;
    return this;
  }

   /**
   * Get state
   * @return state
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public State getState() {
    return state;
  }


  public void setState(State state) {
    this.state = state;
  }


  public CreateNegativeTargetingClause expression(List<TargetingExpressionPredicate> expression) {
    
    this.expression = expression;
    return this;
  }

  public CreateNegativeTargetingClause addExpressionItem(TargetingExpressionPredicate expressionItem) {
    if (this.expression == null) {
      this.expression = new ArrayList<TargetingExpressionPredicate>();
    }
    this.expression.add(expressionItem);
    return this;
  }

   /**
   * The negative targeting expression.
   * @return expression
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The negative targeting expression.")

  public List<TargetingExpressionPredicate> getExpression() {
    return expression;
  }


  public void setExpression(List<TargetingExpressionPredicate> expression) {
    this.expression = expression;
  }


  public CreateNegativeTargetingClause expressionType(ExpressionType expressionType) {
    
    this.expressionType = expressionType;
    return this;
  }

   /**
   * Get expressionType
   * @return expressionType
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public ExpressionType getExpressionType() {
    return expressionType;
  }


  public void setExpressionType(ExpressionType expressionType) {
    this.expressionType = expressionType;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CreateNegativeTargetingClause createNegativeTargetingClause = (CreateNegativeTargetingClause) o;
    return Objects.equals(this.campaignId, createNegativeTargetingClause.campaignId) &&
        Objects.equals(this.adGroupId, createNegativeTargetingClause.adGroupId) &&
        Objects.equals(this.state, createNegativeTargetingClause.state) &&
        Objects.equals(this.expression, createNegativeTargetingClause.expression) &&
        Objects.equals(this.expressionType, createNegativeTargetingClause.expressionType);
  }

  @Override
  public int hashCode() {
    return Objects.hash(campaignId, adGroupId, state, expression, expressionType);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CreateNegativeTargetingClause {\n");
    sb.append("    campaignId: ").append(toIndentedString(campaignId)).append("\n");
    sb.append("    adGroupId: ").append(toIndentedString(adGroupId)).append("\n");
    sb.append("    state: ").append(toIndentedString(state)).append("\n");
    sb.append("    expression: ").append(toIndentedString(expression)).append("\n");
    sb.append("    expressionType: ").append(toIndentedString(expressionType)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

